home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / Technical Docs / Human Interface / Human Interface Notes / ASCII Versions / HIN.004 < prev    next >
Encoding:
Text File  |  1990-02-20  |  4.3 KB  |  83 lines  |  [TEXT/pdos]

  1. Human Interface Notes
  2. _____________________________________________________________________________
  3.  
  4. Note #4:    Movable Modal Dialog Boxes
  5.  
  6.             Written by:  Scott Jenson                            January 1990
  7. _____________________________________________________________________________
  8.  
  9. Discussion of a new modal window style that can be moved by 
  10. dragging its title bar.
  11. _____________________________________________________________________________
  12.  
  13. A standard modal dialog box works well as long as you, the developer, are 
  14. asking such questions as "How do you want to print this document?" or 
  15. "Save changes before quitting?"  However, sometimes you need to ask a 
  16. question and the user needs to see the document contents to make a decision.  
  17. A common example is a Find... or Replace... dialog box.  The usual rule of
  18. choice is to use a modeless dialog box since 1) it's less intrusive on the
  19. is to use a modeless dialog box since 1) it's less intrusive on the 
  20. many different ways people may want to use your software, and 2) since it's
  21. movable, the user can easily move it around to view covered parts of the 
  22. document.  There are some cases, however, when the question or response 
  23. task needs to be modal, but the user still might want to view what's behind 
  24. the dialog box.  An example would be a complex attribute change like adding 
  25. a border to a paragraph of text.  You might want to see the text or even 
  26. other paragraphs while you're setting up the border.
  27.  
  28. In these cases use a movable modal dialog box.  This window design gives 
  29. you visual feedback both that it is a modal dialog box and also that you 
  30. can drag it from the title bar.
  31.  
  32. Figure 1 shows a simple example of this dialog box style.
  33.            __________________________________________________
  34.            ||-------------------Border Style----------------||
  35.            ||-----------------------------------------------||
  36.            ||    ____     ======     ++++++     ^^^^^^      ||
  37.            ||    |        =          +          ^           ||
  38.            ||    |        =          +          ^           ||
  39.            ||    |        =          +          ^           ||
  40.            ||                                               ||
  41.            ||   ######    @@@@@       %%%%%%    &&&&&&&     ||
  42.            ||   #         @           %         &           ||
  43.            ||   #         @           %         &           ||
  44.            ||   #         @           %         &           ||
  45.            ||                                               ||
  46.            ||                 _________      #########      ||
  47.            ||                /  Cancel \    /   OK    \     ||
  48.            ||                \_________/    \         /     ||
  49.            ||                                #########      ||
  50.            ||_______________________________________________||                           
  51.            ||-----------------------------------------------||
  52.                    
  53.                    Figure 1 - Movable modal dialog box
  54.  
  55. A couple of points to keep in mind:
  56.  
  57.   o  Any selection made in the dialog box should 
  58.      immediately update the document contents.  The OK 
  59.      button  then means "accept this change" and the 
  60.      Cancel button means "undo all changes done by this 
  61.      dialog box."  Some applications use an Apply button 
  62.      to approximate this behavior but this only confuses 
  63.      the meaning of OK and Cancel.
  64.   o  With this dialog box, it is not necessary to keep 
  65.      your application from switching to other 
  66.      MultiFinder layers.  System 7.0 uses this method to 
  67.      show an application is busy with some time-
  68.      consuming operation, yet can still be switched into 
  69.      the background.
  70.   o  When you create this dialog box, be sure to use 
  71.      the new window type.  Do not draw a rect in a 
  72.      documentProc.  System 7.0 has as new selector on 
  73.      the standard 'WDEF' resource for this type of 
  74.      window.  For System Software 6.0.x, you can obtain 
  75.      a new 'WDEF' resource on AppleLink in the the Human 
  76.      Interface section of the Developer Services 
  77.      Bulletin Board or request a copy by writing to 
  78.      AppleLink address MACINTERFACE.
  79.   o  Make sure to save the position of the window for 
  80.      the next time it's used.
  81.   o  Do not use this dialog box when a modeless 
  82.      dialog box would work instead.
  83.